<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>会员分红</title>
	<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport"/>
	<meta content="yes" name="apple-mobile-web-app-capable"/>
	<meta content="black" name="apple-mobile-web-app-status-bar-style"/>
	<meta content="telephone=no" name="format-detection"/>
	<link type="text/css" rel="stylesheet" href="/carworld_weixin/themes/css/base.css">
	<link type="text/css" rel="stylesheet" href="/carworld_weixin/themes/css/home.css">
	<link type="text/css" rel="stylesheet" href="/carworld_weixin/themes/css/icon.css">
	<link rel="icon" type="image/x-icon" href="/carworld_weixin/favicon.ico">
	<link href="iTunesArtwork@2x.png" sizes="114x114" rel="apple-touch-icon-precomposed">
</head>
<body>
<section class="aui-flexView">
	<header class="aui-navBar aui-navBar-fixed b-line">
		<div class="aui-center">
			<span class="aui-center-title">分红账户</span>
		</div>
	</header>
	<section class="aui-scrollView">
		<div class="aui-inter-user">
			<div class="aui-flex" >
				<div class="aui-inter-user-img" id="photo">
					<!--<img src="../themes/img/user/user-logo-003.png" alt="">-->
				</div>
				<div class="aui-flex-box">
					<h2 id="phone"></h2>
					<p>账户余额:&nbsp<i id="ownCash"></i></p>
				</div>
				<div class="aui-inter-user-no" onclick="" id="takeCash">

				</div>
			</div>
		</div>
		<div class="aui-inter-grids aui-inter-grids-blue">
			<a href="javascript:;" class="aui-grids-item">
				<h3>总收益</h3>
				<p id="divRecordCount"></p>
			</a>
			<a href="javascript:;" class="aui-grids-item">
				<h3>当日分红</h3>
				<p id="tCashToday"></p>
			</a>
			<a href="javascript:;" class="aui-grids-item">
				<h3>已提现</h3>
				<p id="tCashCount"></p>
			</a>
		</div>
		<div class="aui-palace aui-palace-nav">
			<a href="/carworld_weixin/pages/page_userCard/myVipCard.html" class="aui-palace-grid">
				<div class="aui-palace-grid-icon">
					<img src="../themes/img/icon/icon-nav-001.png" alt="">
				</div>
				<div class="aui-palace-grid-text">
					<p>我的套餐</p>
				</div>
			</a>
			<a href="inComels" class="aui-palace-grid">
				<div class="aui-palace-grid-icon">
					<img src="../themes/img/icon/icon-nav-003.png" alt="">
				</div>
				<div class="aui-palace-grid-text">
					<p>收益列表</p>
				</div>
			</a>
			<a href="takeCash" class="aui-palace-grid">
				<div class="aui-palace-grid-icon">
					<img src="../themes/img/icon/icon-nav-002.png" alt="">
				</div>
				<div class="aui-palace-grid-text">
					<p>提现列表</p>
				</div>
			</a>
			<a href="teamls" class="aui-palace-grid">
				<div class="aui-palace-grid-icon">
					<img src="../themes/img/icon/icon-nav-004.png" alt="">
				</div>
				<div class="aui-palace-grid-text">
					<p>我的人脉</p>
				</div>
			</a>
		</div>
		<div class="divHeight"></div>
	</section>

</section>
</body>
<script type="text/javascript" src="/carworld_weixin/themes/js/jquery.min.js"></script>
<script type="text/javascript" src="/carworld_weixin/themes/js/slider.js"></script>
<script type="text/javascript" src="/carworld_weixin/themes/js/layer.js"></script>
<script type="text/javascript" src="/carworld_weixin/js/jquery.i18n.js"></script>
<script type="text/javascript">
	function b() {
		t = parseInt(x.css('top'));
		y.css('top', '20px');
		x.animate({
			top: t - 20 + 'px'
		}, 'slow');
		if (Math.abs(t) == h - 20) {
			y.animate({
				top: '0px'
			}, 'slow');
			z = x;
			x = y;
			y = z;
		}
		setTimeout(b, 3000);
	}
	$(document).ready(function() {
		$('.swap').html($('.news_li').html());
		x = $('.news_li');
		y = $('.swap');
		h = $('.news_li li').length * 20;
		setTimeout(b, 3000);
        init();
        var defaultLang = "cn"
        languageSelect(defaultLang);

	})
    /*默认语言*/

    function languageSelect(defaultLang){
        $("[i18n]").i18n({
            defaultLang: defaultLang,
            filePath: "./i18n/",
            filePrefix: "i18n_",
            fileSuffix: "",
            forever: true,
            callback: function(res) {}
        });
    }

	function init() {
        $.ajax({
            url: "getDiList",
            success:function (data) {
                console.log(data)
                $("#ownCash").text(data.ownCash);
                $("#tCashToday").text(data.tCashToday);
                $("#tCashCount").text(data.tCashCount);
                $("#divRecordCount").text(data.divRecordCount);
                $("#phone").text(data.phonenum);
                if(1==data.user.user_role){
                    $("#takeCash").append('\t<a href="../withdraw/takeCashPage" ><span>立即提现</span></a>');
                }
                if(data.photo.length>0){
                    $("#photo").append('<img src="'+data.photo+'" >');
				}else {
                    $("#photo").append('<img src=" ../themes/img/user/user-logo-004.png" >');
				}


            }
        });
    }
    $("#iiiiif").click(function () {
        console.log("444")
        if(true){
            defaultLang = "en",
                languageSelect(defaultLang);
        }else{
            defaultLang = "cn",
                languageSelect(defaultLang);
        }
    })



</script>
</html>
